<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
		<title>PHP手册</title>
		<style>
			body,
			html {
				width: 100%;
				height: 100%;
				margin: 0;
				overflow: hidden;
			}
			
			iframe {
				width: 100%;
				height: 100%;
				border: 0;
			}
		</style>
		<script type="text/javascript">
			if(window.plus) {
				plusReady();
			} else {
				document.addEventListener('plusready', plusReady, false);
			}

			// H5 plus事件处理
			var as = 'pop-in', //默认窗口动画,
				appName = '', //应用名称
				quitCount = 0; // 退出应用计时器
			function plusReady() {
				plus.runtime.getProperty(plus.runtime.appid, function(wgtinfo) {
					appName = wgtinfo.name;
				});

				// 隐藏滚动条
				plus.webview.currentWebview().setStyle({
					scrollIndicator: 'none'
				});
				plus.key.addEventListener('backbutton', function() {
					// Android处理返回键
					quitCount = quitCount + 1;
					if(quitCount >= 2) {
						plus.runtime.quit();
						quitCount = 0;
						return false;
					}
					plus.nativeUI.toast("再按一次退出" + appName, {
						duration: "short"
					});
					setTimeout(function() {
						quitCount = 0;
					}, 2000);
				});
				compatibleAdjust();
			}

			// DOMContentLoaded事件处理
			var _domReady = false;
			document.addEventListener('DOMContentLoaded', function() {
				_domReady = true;
				compatibleAdjust();
			}, false);
			// 兼容性样式调整
			var _adjust = false;

			function compatibleAdjust() {
				if(_adjust || !window.plus || !_domReady) {
					return;
				}
				_adjust = true;
				// iOS平台特效
				if('iOS' == plus.os.name) {
					document.getElementById('content').className = 'scontent'; // 使用div的滚动条
					if(navigator.userAgent.indexOf('StreamApp') >= 0) { // 在流应用模式下显示返回按钮
						document.getElementById('back').style.visibility = 'visible';
					}
				}
				// 预创建二级窗口
				//	preateWebviews();
				// 关闭启动界面
				setTimeout(function() {
					plus.navigator.closeSplashscreen();
					plus.navigator.setStatusBarBackground('#FFFFFF');
					if(plus.navigator.isImmersedStatusbar()) {
						plus.navigator.setStatusBarStyle('UIStatusBarStyleBlackOpaque');
					}
				}, 500);
			}
		</script>

	</head>

	<body>
		<iframe src="https://doc.cppedu.net"></iframe>
	</body>

</html>